{template header}
<div class="container">


<div class="row">

<div class="col-md-8">

    <div class="panel panel-default">
        <div class="panel-body">
            {template top}
        </div>
    </div>



    <div class="panel panel-default" id="info">
        <div class="panel-body" style="position: relative;">


            <div style="position: absolute;right: 15px;top: 15px;"><a class="btn btn-success" href="{tsUrl('article','add',array('groupid'=>$strGroup[groupid]))}">写文档</a></div>


            <ul class="nav nav-pills">
                {if $strGroup['isplace']>0}
                {if !isMobile()}
                {if $arrTopicType}
                <li>
                    <select onchange="jumpto('{tsUrl('group','show',array('id'=>$strGroup[groupid]))}',this.options[this.options.selectedIndex].value)" name="typeid" id="typeid" class="form-control">
                        <option value="">全部文档</option>
                        {loop $arrTopicType $key $item}
                        <option value="{$item['typeid']}" {if $item['typeid']==$typeid}selected{/if}>{$item['typename']}</option>
                        {/loop}
                    </select>
                </li>
                {else}
                <li role="presentation" class="active"><a href="{tsUrl('group','show',array('id'=>$strGroup[groupid]))}#info">文档</a></li>
                {/if}

                <li role="presentation" ><a href="{tsUrl('group','duty',array('id'=>$strGroup[groupid]))}#info">服务</a></li>
                <li role="presentation"><a href="{tsUrl('group','acount',array('id'=>$strGroup[groupid]))}#info">账目</a></li>
                {else}
                <li>
                <select onchange="jump(this.options[this.options.selectedIndex].value)" name="typeid" id="typeid" class="form-control">
                    <option value="{tsUrl('group','show',array('id'=>$strGroup[groupid]))}#info" selected>文档</option>
                    <option value="{tsUrl('group','duty',array('id'=>$strGroup[groupid]))}#info" >服务</option>
                    <option value="{tsUrl('group','acount',array('id'=>$strGroup[groupid]))}#info" >账目</option>
                </select>
                </li>
                {if $arrTopicType}
                <li>
                    <select onchange="jumpto('{tsUrl('group','show',array('id'=>$strGroup[groupid]))}',this.options[this.options.selectedIndex].value)" name="typeid" id="typeid" class="form-control">
                        <option value="">全部</option>
                        {loop $arrTopicType $key $item}
                        <option value="{$item['typeid']}" {if $item['typeid']==$typeid}selected{/if}>{$item['typename']}</option>
                        {/loop}
                    </select>
                </li>

                {/if}

                {/if}
                {else}

                        <li>
                            <select onchange="jumpto('{tsUrl('group','show',array('id'=>$strGroup[groupid]))}',this.options[this.options.selectedIndex].value)" name="typeid" id="typeid" class="form-control">
                                <option value="">全部</option>
                                {loop $arrTopicType $key $item}
                                <option value="{$item['typeid']}" {if $item['typeid']==$typeid}selected{/if}>{$item['typename']}</option>
                                {/loop}
                            </select>
                        </li>


                {/if}




            </ul>




<div class="topic_list">
<ul>

{loop $arrArticle $key $item}
<li>
<div class="userimg">
<a href="{tsUrl('user','duty',array('id'=>$item[user][userid]))}" rel="face" uid="{$item['user']['userid']}"><img class="img-circle" src="{$item[user][face]}" width="32" height="32" alt="{$item['user']['username']}" title="{$item['user']['username']}" /></a>
</div>

<div class="topic_title">
<div class="title">

{if $item['appkey'] != 'group' && $item['appkey']!=''}
<a target="_blank" style="color:#999999;font-size: 12px;margin-right: 5px;" class="titles-type" href="{SITE_URL}{php echo tsUrl($item['appkey'])}">[{$item['appname']}]</a>
<a title="{$item[title]}" href="{SITE_URL}{php echo tsUrl($item['appkey'],$item['appaction'],array('id'=>$item['appid']))}{$mylink}">{$item[title]}</a>
{else}
<a title="{$item[title]}" href="{tsUrl('article','show',array('id'=>$item[articleid]))}{$mylink}">{$item[title]}</a>
{/if}
    {if $item[istop]=='1'}
    <i style="color: #999999" class="fa fa-arrow-circle-o-up"></i>
    {/if}




</div>
<div class="topic_info">
<span style="float:left;">
    <a href="{tsUrl('user','article',array('id'=>$item[userid]))}"  rel="face" uid="{$item['user']['userid']}">{$item[user][username]}</a>
    {php echo getTime($item[addtime],time())}
</span>
<span style="float:right;">
  {$item['count_view']}阅 |   {$item['count_comment']}评
</span>

</div>
</div>

<div class="topic_content" style="padding-top: 10px" onclick="jump('{php echo(tsUrl('article','show',array('id'=>$item[articleid])).$mylink)}')">{$item['abs']}</div>
     <div style="{if isMobile()}display:flex;justify-content:space-between;{else}float:right;{/if}padding-top: 5px">
    {if $TS_USER[isadmin]==1||$item['userid']==$TS_USER['userid']}

    <a class="btn btn-w" style="width: 65px"  href="{SITE_URL}index.php?app=article&ac=edit&articleid={$item[articleid]}">修改</a>
    <a class="btn btn-w" style="width: 65px"  href="{SITE_URL}index.php?app=article&ac=delete&articleid={$item[articleid]}&token={$_SESSION['token']}"  onClick="return confirm('确定删除吗?')">删除</a>

    {/if}
    {if $TS_USER[isadmin]==1}
    <a class="btn btn-w" style="width: 65px"  href="javascript:void('0');" onclick="tsPost('index.php?app=group&ac=ajax&ts=isdes&js=1',{'articleid':'{$item['articleid']}'})">{if $item['isdes']}取消描述{else}设为描述{/if}</a>

    <a class="btn btn-w" style="width: 65px"  href="{SITE_URL}index.php?app=group&ac=do&ts=article_istop&articleid={$item[articleid]}">{if $item[istop]=='0'}置顶{else}解置{/if}</a>

    {/if}
    </div>

    <div class="clear"></div>
</li>
{/loop}

</ul>
</div>

<div class="page">{$pageUrl}</div>
</div>
</div>

</div>
    {template right}
</div>
</div>



{template footer}